package patrol.mobile.com.mobilepatrol.adapter;

import android.content.Context;

import com.dl7.recycler.adapter.BaseQuickAdapter;
import com.dl7.recycler.adapter.BaseViewHolder;

import patrol.mobile.com.mobilepatrol.R;
import patrol.mobile.com.mobilepatrol.bean.AdviceListBean;

/**
 * Created by admin on 2018/9/9.
 */

public class AdviceAdapter extends BaseQuickAdapter<AdviceListBean> {

    public AdviceAdapter(Context context) {
        super(context);
    }

    @Override
    protected int attachLayoutRes() {
        return R.layout.item_advice;
    }

    @Override
    protected void convert(BaseViewHolder holder, AdviceListBean item) {
        holder.setText(R.id.tv_num, (holder.getAdapterPosition() + 1) + "");
        holder.setText(R.id.tv_title, item.getTitle());
        holder.setText(R.id.tv_name, item.getUpUserName());
        holder.setText(R.id.tv_time, item.getUpDate());
        holder.setText(R.id.tv_state, item.getAuditName());
    }
}
